package cake.entity;

import cake.dao.CategoryDao;
import cake.dao.impl.CategoryDaoImpl;

public class Cake {
	private int id;
	private String name;
	private int categoryid;
	private float price;
	private int stock;
	private boolean cakeStatus;
	private String mainimg;
    private int count;
	public Cake() {
		super();
	}

	public Cake(int id, String name, int categoryid, float price, int stock, boolean cakeStatus, String mainimg) {
		super();
		this.id = id;
		this.name = name;
		this.categoryid = categoryid;
		this.price = price;
		this.stock = stock;
		this.cakeStatus = cakeStatus;
		this.mainimg = mainimg;
	}
	
	

	public Cake(int id, String name, int categoryid, float price, int stock, boolean cakeStatus, String mainimg,
			int count) {
		super();
		this.id = id;
		this.name = name;
		this.categoryid = categoryid;
		this.price = price;
		this.stock = stock;
		this.cakeStatus = cakeStatus;
		this.mainimg = mainimg;
		this.count = count;
	}
	
	public String getcategoryname(int categoryid) {
		CategoryDao categoryDao=new CategoryDaoImpl();
		Category c=categoryDao.getCategoryById(categoryid);
		return c.getName();		
	}
	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getCategoryid() {
		return categoryid;
	}

	public void setCategoryid(int categoryid) {
		this.categoryid = categoryid;
	}

	public float getPrice() {
		return price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public int getStock() {
		return stock;
	}

	public void setStock(int stock) {
		this.stock = stock;
	}

	public boolean isCakeStatus() {
		return cakeStatus;
	}

	public void setCakeStatus(boolean cakeStatus) {
		this.cakeStatus = cakeStatus;
	}

	public String getMainimg() {
		return mainimg;
	}

	public void setMainimg(String mainimg) {
		this.mainimg = mainimg;
	}

}
